/*
Adept MobileRobots Robotics Interface for Applications (ARIA)
Copyright (C) 2004-2005 ActivMedia Robotics LLC
Copyright (C) 2006-2010 MobileRobots Inc.
Copyright (C) 2011-2014 Adept Technology

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

If you wish to redistribute ARIA under different terms, contact 
Adept MobileRobots for information about a commercial version of ARIA at 
robots@mobilerobots.com or 
Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960
*/
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.40
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.mobilerobots.Aria;

public class ArGPS {
  /* (begin code from javabody typemap) */

  private long swigCPtr;
  protected boolean swigCMemOwn;

  /* for internal use by swig only */
  public ArGPS(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  /* for internal use by swig only */
  public static long getCPtr(ArGPS obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  /* (end code from javabody typemap) */

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        AriaJavaJNI.delete_ArGPS(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public ArGPS() {
    this(AriaJavaJNI.new_ArGPS(), true);
  }

  public void setDeviceConnection(ArDeviceConnection deviceConn) {
    AriaJavaJNI.ArGPS_setDeviceConnection(swigCPtr, this, ArDeviceConnection.getCPtr(deviceConn), deviceConn);
  }

  public ArDeviceConnection getDeviceConnection() {
    long cPtr = AriaJavaJNI.ArGPS_getDeviceConnection(swigCPtr, this);
    return (cPtr == 0) ? null : new ArDeviceConnection(cPtr, false);
  }

  public boolean connect(long connectTimeout) {
    return AriaJavaJNI.ArGPS_connect__SWIG_0(swigCPtr, this, connectTimeout);
  }

  public boolean connect() {
    return AriaJavaJNI.ArGPS_connect__SWIG_1(swigCPtr, this);
  }

  public boolean blockingConnect(long connectTimeout) {
    return AriaJavaJNI.ArGPS_blockingConnect__SWIG_0(swigCPtr, this, connectTimeout);
  }

  public boolean blockingConnect() {
    return AriaJavaJNI.ArGPS_blockingConnect__SWIG_1(swigCPtr, this);
  }

  public void setReadFlags(int value) {
    AriaJavaJNI.ArGPS_ReadFlags_set(swigCPtr, this, value);
  }

  public int getReadFlags() {
    return AriaJavaJNI.ArGPS_ReadFlags_get(swigCPtr, this);
  }

  public int read(long maxTime) {
    return AriaJavaJNI.ArGPS_read__SWIG_0(swigCPtr, this, maxTime);
  }

  public int read() {
    return AriaJavaJNI.ArGPS_read__SWIG_1(swigCPtr, this);
  }

  public int readWithLock(long maxTime) {
    return AriaJavaJNI.ArGPS_readWithLock(swigCPtr, this, maxTime);
  }

  public void lock() {
    AriaJavaJNI.ArGPS_lock(swigCPtr, this);
  }

  public void unlock() {
    AriaJavaJNI.ArGPS_unlock(swigCPtr, this);
  }

  public void setIgnoreChecksum(boolean ignore) {
    AriaJavaJNI.ArGPS_setIgnoreChecksum(swigCPtr, this, ignore);
  }

  public void logData() {
    AriaJavaJNI.ArGPS_logData(swigCPtr, this);
  }

  public void printData(boolean labels) {
    AriaJavaJNI.ArGPS_printData__SWIG_0(swigCPtr, this, labels);
  }

  public void printData() {
    AriaJavaJNI.ArGPS_printData__SWIG_1(swigCPtr, this);
  }

  public void printDataLabelsHeader() {
    AriaJavaJNI.ArGPS_printDataLabelsHeader(swigCPtr, this);
  }

  public SWIGTYPE_p_ArGPS__Data getCurrentDataRef() {
    return new SWIGTYPE_p_ArGPS__Data(AriaJavaJNI.ArGPS_getCurrentDataRef(swigCPtr, this), false);
  }

  public ArGPS.FixType getFixType() {
    return ArGPS.FixType.swigToEnum(AriaJavaJNI.ArGPS_getFixType(swigCPtr, this));
  }

  public String getFixTypeName() {
    return AriaJavaJNI.ArGPS_getFixTypeName__SWIG_0(swigCPtr, this);
  }

  public static String getFixTypeName(ArGPS.FixType type) {
    return AriaJavaJNI.ArGPS_getFixTypeName__SWIG_1(type.swigValue());
  }

  public boolean havePosition() {
    return AriaJavaJNI.ArGPS_havePosition(swigCPtr, this);
  }

  public boolean haveLatitude() {
    return AriaJavaJNI.ArGPS_haveLatitude(swigCPtr, this);
  }

  public boolean haveLongitude() {
    return AriaJavaJNI.ArGPS_haveLongitude(swigCPtr, this);
  }

  public double getLatitude() {
    return AriaJavaJNI.ArGPS_getLatitude(swigCPtr, this);
  }

  public double getLongitude() {
    return AriaJavaJNI.ArGPS_getLongitude(swigCPtr, this);
  }

  public ArTime getTimeReceivedPosition() {
    return new ArTime(AriaJavaJNI.ArGPS_getTimeReceivedPosition(swigCPtr, this), true);
  }

  public boolean haveSpeed() {
    return AriaJavaJNI.ArGPS_haveSpeed(swigCPtr, this);
  }

  public double getSpeed() {
    return AriaJavaJNI.ArGPS_getSpeed(swigCPtr, this);
  }

  public ArTime getGPSPositionTimestamp() {
    return new ArTime(AriaJavaJNI.ArGPS_getGPSPositionTimestamp(swigCPtr, this), true);
  }

  public int getNumSatellitesTracked() {
    return AriaJavaJNI.ArGPS_getNumSatellitesTracked(swigCPtr, this);
  }

  public boolean haveDGPSStation() {
    return AriaJavaJNI.ArGPS_haveDGPSStation(swigCPtr, this);
  }

  public int getDGPSStationID() {
    return AriaJavaJNI.ArGPS_getDGPSStationID(swigCPtr, this);
  }

  public boolean haveGarminPositionError() {
    return AriaJavaJNI.ArGPS_haveGarminPositionError(swigCPtr, this);
  }

  public double getGarminPositionError() {
    return AriaJavaJNI.ArGPS_getGarminPositionError(swigCPtr, this);
  }

  public boolean haveGarminVerticalPositionError() {
    return AriaJavaJNI.ArGPS_haveGarminVerticalPositionError(swigCPtr, this);
  }

  public double getGarminVerticalPositionError() {
    return AriaJavaJNI.ArGPS_getGarminVerticalPositionError(swigCPtr, this);
  }

  public boolean haveCompassHeadingMag() {
    return AriaJavaJNI.ArGPS_haveCompassHeadingMag(swigCPtr, this);
  }

  public boolean haveCompassHeadingTrue() {
    return AriaJavaJNI.ArGPS_haveCompassHeadingTrue(swigCPtr, this);
  }

  public double getCompassHeadingMag() {
    return AriaJavaJNI.ArGPS_getCompassHeadingMag(swigCPtr, this);
  }

  public double getCompassHeadingTrue() {
    return AriaJavaJNI.ArGPS_getCompassHeadingTrue(swigCPtr, this);
  }

  public void setCompassHeadingMag(double val) {
    AriaJavaJNI.ArGPS_setCompassHeadingMag(swigCPtr, this, val);
  }

  public void setCompassHeadingTrue(double val) {
    AriaJavaJNI.ArGPS_setCompassHeadingTrue(swigCPtr, this, val);
  }

  public void setCompassHeadingMagWithLock(double val) {
    AriaJavaJNI.ArGPS_setCompassHeadingMagWithLock(swigCPtr, this, val);
  }

  public void setCompassHeadingTrueWithLock(double val) {
    AriaJavaJNI.ArGPS_setCompassHeadingTrueWithLock(swigCPtr, this, val);
  }

  public boolean haveAltitude() {
    return AriaJavaJNI.ArGPS_haveAltitude(swigCPtr, this);
  }

  public double getAltitude() {
    return AriaJavaJNI.ArGPS_getAltitude(swigCPtr, this);
  }

  public boolean haveAltimeter() {
    return AriaJavaJNI.ArGPS_haveAltimeter(swigCPtr, this);
  }

  public double getAltimeter() {
    return AriaJavaJNI.ArGPS_getAltimeter(swigCPtr, this);
  }

  public boolean haveHDOP() {
    return AriaJavaJNI.ArGPS_haveHDOP(swigCPtr, this);
  }

  public double getHDOP() {
    return AriaJavaJNI.ArGPS_getHDOP(swigCPtr, this);
  }

  public boolean haveVDOP() {
    return AriaJavaJNI.ArGPS_haveVDOP(swigCPtr, this);
  }

  public double getVDOP() {
    return AriaJavaJNI.ArGPS_getVDOP(swigCPtr, this);
  }

  public boolean havePDOP() {
    return AriaJavaJNI.ArGPS_havePDOP(swigCPtr, this);
  }

  public double getPDOP() {
    return AriaJavaJNI.ArGPS_getPDOP(swigCPtr, this);
  }

  public boolean haveSNR() {
    return AriaJavaJNI.ArGPS_haveSNR(swigCPtr, this);
  }

  public double getMeanSNR() {
    return AriaJavaJNI.ArGPS_getMeanSNR(swigCPtr, this);
  }

  public boolean haveBeaconInfo() {
    return AriaJavaJNI.ArGPS_haveBeaconInfo(swigCPtr, this);
  }

  public double getBeaconSignalStrength() {
    return AriaJavaJNI.ArGPS_getBeaconSignalStrength(swigCPtr, this);
  }

  public double getBeaconSNR() {
    return AriaJavaJNI.ArGPS_getBeaconSNR(swigCPtr, this);
  }

  public double getBeaconFreq() {
    return AriaJavaJNI.ArGPS_getBeaconFreq(swigCPtr, this);
  }

  public int getBecaonBPS() {
    return AriaJavaJNI.ArGPS_getBecaonBPS(swigCPtr, this);
  }

  public int getBeaconChannel() {
    return AriaJavaJNI.ArGPS_getBeaconChannel(swigCPtr, this);
  }

  public boolean haveErrorEllipse() {
    return AriaJavaJNI.ArGPS_haveErrorEllipse(swigCPtr, this);
  }

  public ArPose getErrorEllipse() {
    return new ArPose(AriaJavaJNI.ArGPS_getErrorEllipse(swigCPtr, this), true);
  }

  public boolean haveLatLonError() {
    return AriaJavaJNI.ArGPS_haveLatLonError(swigCPtr, this);
  }

  public ArPose getLatLonError() {
    return new ArPose(AriaJavaJNI.ArGPS_getLatLonError(swigCPtr, this), true);
  }

  public double getLatitudeError() {
    return AriaJavaJNI.ArGPS_getLatitudeError(swigCPtr, this);
  }

  public double getLongitudeError() {
    return AriaJavaJNI.ArGPS_getLongitudeError(swigCPtr, this);
  }

  public boolean haveAltitudeError() {
    return AriaJavaJNI.ArGPS_haveAltitudeError(swigCPtr, this);
  }

  public double getAltitudeError() {
    return AriaJavaJNI.ArGPS_getAltitudeError(swigCPtr, this);
  }

  public boolean haveInputsRMS() {
    return AriaJavaJNI.ArGPS_haveInputsRMS(swigCPtr, this);
  }

  public double getInputsRMS() {
    return AriaJavaJNI.ArGPS_getInputsRMS(swigCPtr, this);
  }

  public void addNMEAHandler(String message, SWIGTYPE_p_ArFunctor1T_ArNMEAParser__Message_t handler) {
    AriaJavaJNI.ArGPS_addNMEAHandler(swigCPtr, this, message, SWIGTYPE_p_ArFunctor1T_ArNMEAParser__Message_t.getCPtr(handler));
  }

  public void removeNMEAHandler(String message) {
    AriaJavaJNI.ArGPS_removeNMEAHandler(swigCPtr, this, message);
  }

  public void replaceNMEAHandler(String message, SWIGTYPE_p_ArFunctor1T_ArNMEAParser__Message_t handler) {
    AriaJavaJNI.ArGPS_replaceNMEAHandler(swigCPtr, this, message, SWIGTYPE_p_ArFunctor1T_ArNMEAParser__Message_t.getCPtr(handler));
  }

  public final static int ReadFinished = AriaJavaJNI.ArGPS_ReadFinished_get();
  public final static int ReadError = AriaJavaJNI.ArGPS_ReadError_get();
  public final static int ReadData = AriaJavaJNI.ArGPS_ReadData_get();
  public final static int ReadUpdated = AriaJavaJNI.ArGPS_ReadUpdated_get();

  public final static class FixType {
    public final static FixType NoFix = new FixType("NoFix");
    public final static FixType BadFix = new FixType("BadFix");
    public final static FixType GPSFix = new FixType("GPSFix");
    public final static FixType DGPSFix = new FixType("DGPSFix");
    public final static FixType PPSFix = new FixType("PPSFix");
    public final static FixType RTKinFix = new FixType("RTKinFix");
    public final static FixType FloatRTKinFix = new FixType("FloatRTKinFix");
    public final static FixType DeadReckFix = new FixType("DeadReckFix");
    public final static FixType ManualFix = new FixType("ManualFix");
    public final static FixType SimulatedFix = new FixType("SimulatedFix");
    public final static FixType UnknownFixType = new FixType("UnknownFixType");
    public final static FixType OmnistarConverging = new FixType("OmnistarConverging", AriaJavaJNI.ArGPS_OmnistarConverging_get());
    public final static FixType OmnistarConverged = new FixType("OmnistarConverged", AriaJavaJNI.ArGPS_OmnistarConverged_get());

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static FixType swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + FixType.class + " with value " + swigValue);
    }

    private FixType(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private FixType(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private FixType(String swigName, FixType swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static FixType[] swigValues = { NoFix, BadFix, GPSFix, DGPSFix, PPSFix, RTKinFix, FloatRTKinFix, DeadReckFix, ManualFix, SimulatedFix, UnknownFixType, OmnistarConverging, OmnistarConverged };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
